using System;

using Dashboard;
using Dashboard.Util;

namespace Dashboard.Mint.Actions {
	
	[Action (Type = "db:contact")]
	public class ContactShowAction : Action {

		public ContactShowAction ()
		{
			Name = "Show Contact";
			Description = "Show contact editor";
			//Icon = "compass"; // FIXME: Icon
		}

		public override void Execute (Match match)
		{
			SafeProcess p = new SafeProcess ();
			p.Arguments = new string[] { "evolution", match.Uri.ToString ()};

			try {
				p.Start ();
			} catch (SafeProcessException e) {
				Console.WriteLine ("Unable to run {0}: {1}", p.Arguments [0], e.Message);
			}
		}
	}
}